<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
 
<html> 
	<head>
		<title>Edit user info page</title>
	</head>
	<body>
		<%String errorMessage=(String)request.getAttribute("errorMessage");%>
		<% if (errorMessage != null) {%>
		<font color=red><%=errorMessage %></font>
		<% }%>
		
		<% String   id = (String)request.getAttribute("ID");%>
		<% String   userName = (String)request.getAttribute("userName");%>
		<% String   password = (String)request.getAttribute("passwd");%>
		<% String   firstName = (String)request.getAttribute("firstname");%>
		<% String   lastName = (String)request.getAttribute("lastname");%>
		<% String   phoneNumber = (String)request.getAttribute("phonenumber");%>
		<% String   address = (String)request.getAttribute("address");%>
		<% String   email = (String)request.getAttribute("email");%>
		
		<html:form action="/userInfoEdit">
			<table width="100%">		
				<tr valign="top">
					<td width="1%">&nbsp;</td>
					<td width="32%" align="right" nowrap="nowrap">User name:</td>
					<td colspan="2" width="67%">
						<html:text property="userName" value="<%=userName%>" /><html:errors property="userName"/><font color="purple">&nbsp;*</font>
					</td>
				</tr>
				
				<tr valign="top">
					<td width="1%">&nbsp;</td>
					<td width="32%" align="right" nowrap="nowrap">Email:</td>
					<td colspan="2" width="67%">
						<html:text property="email" value="<%=email%>" /><html:errors property="email"/><font color="purple">&nbsp;*</font>
					</td>
				</tr>
				
				<tr valign="top">
					<td width="1%">&nbsp;</td>
					<td width="32%" align="right" nowrap="nowrap">Password:</td>
					<td colspan="2" width="67%">
						<html:password property="password" value="<%=password%>" /><html:errors property="password"/><font color="purple">&nbsp;*</font>
					</td>
				</tr>
				
				<tr valign="top">
					<td width="1%">&nbsp;</td>
					<td width="32%" align="right" nowrap="nowrap">Confirm Password:</td>
					<td colspan="2" width="67%">
						<html:password property="confirmPassword"  /><html:errors property="confirmPassword"/><font color="purple">&nbsp;*</font>
					</td>
				</tr>
				
				<tr valign="top">
					<td width="1%">&nbsp;</td>
					<td width="32%" align="right" nowrap="nowrap">First Name:</td>
					<td colspan="2" width="67%">
						<html:text property="firstName" value="<%=firstName%>" /><html:errors property="firstName"/>
					</td>
				</tr>
				
				<tr valign="top">
					<td width="1%">&nbsp;</td>
					<td width="32%" align="right" nowrap="nowrap">Last Name:</td>
					<td colspan="2" width="67%">
						<html:text property="lastName" value="<%=lastName%>" /><html:errors property="lastName"/>
					</td>
				</tr>
				
				<tr valign="top">
					<td width="1%">&nbsp;</td>
					<td width="32%" align="right" nowrap="nowrap">Address:</td>
					<td colspan="2" width="67%">
						<html:text property="address" value="<%=address%>" /><html:errors property="address"/>
					</td>
				</tr>
				
				<tr valign="top">
					<td width="1%">&nbsp;</td>
					<td width="32%" align="right" nowrap="nowrap">Phone Number:</td>
					<td colspan="2" width="67%">
						<html:text property="phoneNumber" value="<%=phoneNumber%>" /><html:errors property="phoneNumber"/>
					</td>
				</tr>
				
				
				
				<tr valign="top">
					<td width="1%">&nbsp;</td>
					<td width="32%" align="right" nowrap="nowrap"></td>
					<td colspan="2" width="67%">
						<html:submit value="Save"/><html:cancel/>
					</td>
				</tr>
				
				<tr valign="top">
					<td width="1%">&nbsp;</td>
					<td width="32%" align="right" nowrap="nowrap"></td>
					<td colspan="2" width="67%">
						<html:hidden property="id" value="<%=id%>" /> <html:errors property="id"/>
					</td>
				</tr>
				
			</table>
		</html:form>
	</body>
</html>

